<!--
 * @Descripttion:
 * @version:
 * @Author:
 * @Date: 2019-10-24 17:25:56
 -->
<template>
  <!-- <ul>
    <li v-for="val in item.lists"
        :key="val.id">
      <baseSelect :item="val"></baseSelect>
    </li>
  </ul> -->
  <div>
    <baseSelect :item="item.lists[0]"
                @changeHandle="changeHandle1"></baseSelect>
    <baseSelect :item="item.lists[1]"
                @changeHandle="changeHandle2"></baseSelect>
  </div>
</template>

<script>

import baseSelect from '../base/baseSelect'


export default {
  components: {
    baseSelect
  },
  props: {
    item: {
      type: Object,
      required: true
    }
  },
  data () {
    return {

    }
  },
  mounted () {
    this.item.result = {}
  },

  methods: {
    // getDatas (index) {

    //   if (index == urls.length - 1) {
    //     return
    //   }
    //   this.getDatas(++index)
    // },


    changeHandle1 (value, item) {
      let parame = item[value]
      this.axios.get(this.item.url2, parame).then(res => {
        this.$set(this.item.lists, 1, {
          "label": "性别3",
          "value": "",
          "button": false,
          "border": true,
          "rules": [],
          "key": "gender",
          "options": [{
            "value": "1",
            "label": "男3",
            "disabled": false
          },
          {
            "value": "0",
            "label": "女3",
            "disabled": false
          }
          ]
        })
      })

    },
    changeHandle2 (value, item) {
    },
  },
}
</script>

